<template>
    <div class="father">
        父组件
        <!-- <button @click="console.log($event)"></button> -->
        <Child @sendmsg="lookScore($event)"></Child>
    </div>
</template>

<script setup lang="ts" name='Father'>
import { ref, reactive } from "vue";

import Child from "./Child.vue";


//事件监听函数
function lookScore(e: any) {
    console.log("孩子节点告诉父亲有个信息，可以查看成绩单");

    console.log("e", e);

}



</script>

<style scoped>
.father {

    min-height: 150px;
    padding: 20px;
    background-color: cadetblue;
    border-radius: 10px;

}
</style>